export default {
	namespaced: true,
	// 储存数据
	state: {
		token: "",
	},
	// 书写同步方法
	mutations: {
		SET_USER_TOKEN(state, payload) {
			state.token = payload.token;
			uni.setStorage({
				key: "token",
				data: payload.token,
			});
		},
		CLEAR_USER_TOKEN(state) {
			state.token = "";
			uni.removeStorage({
				key: 'token'
			});
		},
	},
	// 书写异步方法
	actions: {}
};